<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改商品信息')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-product-edit" th:object="${scmProduct}">
            <input name="id" th:field="*{id}" type="hidden">

            <div class="form-group">    
                <label class="col-sm-3 control-label">商品编码 ：</label>
                <div class="col-sm-8">
                    <input name="productCode" th:field="*{productCode}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商品名称 ：</label>
                <div class="col-sm-8">
                    <input name="productName" th:field="*{productName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">商品来源 ：</label>
                <div class="col-sm-8">
                    <input name="source" th:field="*{source}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">品牌：</label>
                <div class="col-sm-8">
                    <input name="brand" th:field="*{brand}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商品单位 ：</label>
                <div class="col-sm-8">
                    <input name="productUnit" th:field="*{productUnit}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">商品描述 ：</label>
                <div class="col-sm-8">
                    <input name="remark" th:field="*{remark}" class="form-control" type="text">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">参数：</label>
                <div class="col-sm-8">
                    <input name="parameter" th:field="*{productDetailOmsDo.parameter}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">大类：</label>
                <div class="col-sm-8">
                    <input id="kind1" name="kind1" th:field="*{productDetailOmsDo.kind1}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">中类：</label>
                <div class="col-sm-8">
                    <input name="kind2" th:field="*{productDetailOmsDo.kind2}" class="form-control" type="text">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">小类：</label>
                <div class="col-sm-8">
                    <input name="kind3" th:field="*{productDetailOmsDo.kind3}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">型号：</label>
                <div class="col-sm-8">
                    <input name="model" th:field="*{productDetailOmsDo.model}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">颜色：</label>
                <div class="col-sm-8">
                    <input name="color" th:field="*{productDetailOmsDo.color}" class="form-control" type="text">
                </div>
            </div>

            <div class="form-group">    
                <label class="col-sm-3 control-label">开票名称 ：</label>
                <div class="col-sm-8">
                    <input name="invoiceName" th:field="*{productDetailOmsDo.invoiceName}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">税率：</label>
                <div class="col-sm-8">
                    <input name="taxRateText" th:field="*{productDetailOmsDo.taxRateText}" class="form-control" type="text">

                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">税收编码：</label>
                <div class="col-sm-8">
                    <input name="taxCode" th:field="*{productDetailOmsDo.taxCode}" class="form-control" type="text">

                </div>
            </div>


            <div class="form-group">
                <label class="col-sm-3 control-label">商品链接：</label>
                <div class="col-sm-8">
                    <input name="ecPreviewUrl" th:field="*{productDetailOmsDo.ecPreviewUrl}" class="form-control" type="text">

                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">

        var prefix = ctx + "scm/product";

        $("#form-product-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-product-edit').serialize());
            }
        }
    </script>
</body>
</html>
